#pragma once
#include<stdio.h>

 #define MAX 1024

  #define NONE_FLUSH(1<<0)
  #define LINE_FLUSH(1<<1)
  #define FULL_FLUSH(1<<2)
struct myfile{
    int myfilno;
    int bufflen;
    char buffer[MAX];
    int  flushmeth ;
    int flag;
};
typedef struct myfile Myfile;


Myfile* Myfopen(const char *path,const char *mode);

void Myclose(Myfile *);
int  Myfwrite(Myfile *,void *str,int len);
void Myflush(Myfile *);

